int func2(int idx) {
  switch (idx) {
    case 0: return 0x800;
    case 1: return 0x700;
    case 2: return 0xc00;
    case 3: return 0x500;
    case 4: return 0xa00;
    case 5: return 0x300;
    case 6: return 0x200;
    case 7: return 0x100;
    default: return -1; 
  }
  return 0;
}

